//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.aidong.dao.wills;

import com.aidong.dao.wills.BaseDao;
import com.aidong.model.wills.SysDictCode;
import java.util.Date;
import org.springframework.stereotype.Repository;

@Repository
public class SysDictCodeDao extends BaseDao<SysDictCode, Integer> {
	public SysDictCodeDao() {
	}

	public boolean chkExist(String dictType, String dictCode) {
		return this.getByWhere("dictType=:p1 and dictCode=:p2", new Object[]{dictType, dictCode}) != null;
	}

	public boolean updateEnable(int id, int enable) {
		String hql = "update SysDictCode set enable=:p1, updateTime=:p2 where id=:p3";
		return this.updateByHql(hql, new Object[]{Integer.valueOf(enable), new Date(), Integer.valueOf(id)}) > 0;
	}
}
